<?php 

class AwardsView extends View {

	protected $bestClients;
	protected $m;
	
	function __construct() {
	
	}
	
	function getBestClients() {
		return $this->bestClients;
	}
	
	function setBestClients($b) {
		$this->bestClients = $b;
	}
	
	function getM() {
		return $this->m;
	}
	
	function setM($m) {
		$this->m = $m;
	}
	
	function display() {
		echo '<div style="width:90%">';
		echo '<table class="table table-striped">';
		echo '<thead><th>id</th><th>Name</td><td>Surname</th><th>Address</th><th>PhoneNumber</th></thead>';
		if ($this->bestClients) {
			foreach ($this->bestClients as $client) {
				echo '<tr><td>'.$client->getId().'</td><td>'.$client->getFirstName().'</td><td>'.$client->getLastName().'</td><td>'.$client->getAddress().'</td><td>'.$client->getPhoneNumber().'</td></tr>';
			}
		}
		else {
			echo 'Could not fetch best clients. Probably empty database';
		}
		echo '</table>';
		echo '</div>';
	
	}

}

?>